﻿


--修改角色
CREATE PROCEDURE [dbo].[proc_App_Roles_Update]
	(
		@ID INT,		
		@Rname nvarchar(50),
		@Rnote nvarchar(100),
		@FAdminFlg BIT,
		@EntryPeople varchar(50)
	)
AS

	declare @ename NVARCHAR(20)
	set @ename = (SELECT EName FROM Employee WHERE UserName=@EntryPeople)
	IF(@ename is NULL)
	set @ename=@EntryPeople
	UPDATE App_Roles SET  RName= @Rname,RNote = @Rnote,EntryPeople = @ename,EntryTime = GETDATE(),FAdminFlg = @FAdminFlg
	WHERE ID=@ID
	
	RETURN



